package com.gw.youTubeAudioAPI.phpTube
{	
	import flash.events.Event;
	import flash.utils.ByteArray;
	
	/*
	*	this class defines events for phpTube
	*/
	
	public class PHPTubeEvent extends Event 
	{	
		public static var FLV_DOWNLOADED:String = "the flv was succesfully ripped from youtube";
		
		private var _data:ByteArray;
		
		public function PHPTubeEvent(type:String, data:ByteArray, bubbles:Boolean=false, cancelable:Boolean=false)
		{
			super(type, bubbles, cancelable);
			this._data = data;
		}
		public override function clone():Event
		{ 
			return new PHPTubeEvent(type, _data, bubbles, cancelable);
		}
		public override function toString():String
		{ 
			return formatToString("PHPTubeEvent", "_data", "type", "bubbles", "cancelable", "eventPhase"); 
		}
		//interface
		public function get data():ByteArray {
			return _data;
		}
	}
	
}